Carbon


GetIndPattern

Header: Quickdraw.h Carbon status: Supported

Obtains a pattern stored in a pattern list ('PAT#') resource.

void GetIndPattern (
    Pattern *thePat, 
    SInt16 patternListID, 
    SInt16 index
);
Parameter descriptions
thePat

On return, a pointer to a Pattern structure for the pattern stored in the specified pattern list resource.

patternListID

The resource ID for a resource of type ëPAT#’.

index

The index number for the desired pattern within the pattern list ('PAT#') resource. The index number can range from 1 to the number of patterns in the pattern list resource.

DISCUSSION

The GetIndPattern function calls the following Resource Manager function with these parameters:

GetResource('PAT', patListID);

There is a pattern list resource in the System file that contains the standard Macintosh patterns used by MacPaint. The resource ID is represented by the constant sysPathListID.

SPECIAL CONSIDERATIONS

The GetIndPattern function may move or purge memory blocks in the application heap; do not call this function at interrupt time.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)